package com.ants.monitor.bean.bizBean;

import lombok.Data;
import lombok.ToString;

import java.util.Set;

/**
 * Created by zxg on 15/11/17.
 */
@ToString
public class HostBO {
	private String host;
	private String port;

	public HostBO() {
	}

	public HostBO(String host, String port) {
		this.host = host;
		this.port = port;
	}

	private String hostString;

	public String getHostString() {
		if (port == null) {
			return host;
		}
		return host + ":" + port;
	}

	// ======host 页面展示所用====
	Set<String> providers;
	Set<String> consumers;

	// 服务名--即dba定义的该ip地址的名称
	String hostName;
	// 对应的另外一个ip
	String anotherIp;

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public String getPort() {
		return port;
	}

	public void setPort(String port) {
		this.port = port;
	}

	public Set<String> getProviders() {
		return providers;
	}

	public void setProviders(Set<String> providers) {
		this.providers = providers;
	}

	public Set<String> getConsumers() {
		return consumers;
	}

	public void setConsumers(Set<String> consumers) {
		this.consumers = consumers;
	}

	public String getHostName() {
		return hostName;
	}

	public void setHostName(String hostName) {
		this.hostName = hostName;
	}

	public String getAnotherIp() {
		return anotherIp;
	}

	public void setAnotherIp(String anotherIp) {
		this.anotherIp = anotherIp;
	}

	public void setHostString(String hostString) {
		this.hostString = hostString;
	}

}
